%@ page import=java.util.List %
%@ page import=java.util.ArrayList %
%@ page import=com.example.Homework7.user %
%@ page contentType=texthtml;charset=UTF-8 language=java %
%@ taglib prefix=c uri=httpjava.sun.comjspjstlcore %
html
head
    titleTitletitle
head
body
%
    List list = new ArrayList();
    list.add(new user(张三,22,福建));
    list.add(new user(李四,23,江西));
    list.add(new user(王五,25,浙江));
    request.setAttribute(list,list);
%
table border=1 width=500 align=center
    tr
        td编号td
        td姓名td
        td年龄td
        td地址td
        td操作td
    tr
    cforEach items=${list} var=user varStatus=s
        tr
            td${s.count}td
            td${user.name}td
            td${user.age}td
            td${user.ardress}td
            td
                button onclick=javascriptlocation.href='c1test.jspuserIndex=${s.index}'删除button
            td
        tr
    cforEach
table
body
html